package cn.tedu.mybatiesdb;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface mapper
{
    @Insert("INSERT INTO PRODUCT(TITLE,PRICE,STOCK) "
    + "VALUES(#{title},#{price},#{stock})")
    int insert(user user);

    @Update("UPDATE PRODUCT SET TITLE=#{title} WHERE PRICE=#{price}")
    int update(user user);
}
